import Vue from 'vue'

//引入全局样式表
import '../src/assets/global.css'

//引入axios
import axios from 'axios'
//配置axios到全局
Vue.prototype.axios=axios
//设置axios的默认地址
axios.defaults.baseURL='http://175.178.153.53:8080/'
//设置请求拦截器，每次访问前带上token
axios.interceptors.request.use(config=>{
  console.log(config)
  if(config.url!=='/user/login'&&config.url!=='/Logon'&&config.url!=='/send/code'){
    config.headers.token = window.localStorage.getItem('token')
  }
  return config
})

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//富文本编辑器
import VueQuillEditor from "vue-quill-editor";
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)

Vue.config.productionTip = false
Vue.use(ElementUI)

import App from './App.vue'
import router from './router'
import store from './store'

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
